<script type="text/javascript">
$(document).ready(function(){
    /**
     * Modal Dialog Boxes Setup
     */
	$(".modalInput").overlay({

        // some mask tweaks suitable for modal dialogs
        mask: {
            color: '#000',
            loadSpeed: 200,
            opacity: 0.5
        },

        closeOnClick: false
    });

	//Table pagging - sort
	$('#TablePaginate').paginateTable({ rowsPerPage: 10 });
	$('#TablePaginate').tablesort();
});
function confirmDelete(obj) {
    /* Simple Modal Box */
    var buttons1 = $("#simpledialog button").click(function(e) {
	
        // get user input
        var yes = buttons1.index(this) === 0;

        if (yes) {
           window.location.href = obj.accessKey;
        }
    });
}
</script>
<div class="widget modal" id="simpledialog">
        <header><h2>Thông báo hệ thống</h2></header>
        <section>
            <p>
                Bạn thực sự muốn xóa?
            </p>

            <!-- yes/no buttons -->
            <p>
                <button class="button button-blue close">Đồng ý</button>
                <button class="button button-gray close">Hủy</button>
            </p>
        </section>
</div>
<div class="container_8 clearfix">                
	<!-- Main Section -->
	<section class="main-section grid_8">
	<!-- Tables Section -->
	<div class="main-content">
		<header>
			<h2>Danh sách nhân viên hỗ trợ</h2>
		</header>
		<section class="with-table">
			<table id="TablePaginate" class="datatable tablesort selectable full">
				<thead>
					<tr>
						<th style="width: 80px;">Mã support</th>
						<th style="width: 170px;">Tên người hỗ trợ</th>
						<th style="width: 170px;">Yahoo ID</th>
						<th style="width: 170px;">Skype ID</th>
						<th style="width: 80px">Lựa chọn</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<th>Mã nhóm</th>
						<th>Tên nhóm</th>
						<th>Yahoo ID</th>
						<th>Skype ID</th>
						<th>Lựa chọn</th>
					</tr>
				</tfoot>
				<tbody>
			<?php
				foreach ($this->arrSupports as $support)
				{
			?>
					<tr>
						<td><?php echo $support['id']?></td>
						<td><?php echo $support['name']?></td>
						<td><?php echo $support['yahooID']?></td>
						<td><?php echo $support['yahooID']?></td>
						<td>
							<a href="<?php echo $this->url->action("edit",array($support['id']));?>">Sửa</a>/ 
							<a onclick="confirmDelete(this);" class="modalInput" rel="#simpledialog" accesskey="<?php echo $this->url->action("delete",array($support['id']))?>">Xóa</a>
						</td>
					</tr>
					<?php }?>
				</tbody>
			</table>
			<div id='pager' class='pager'>
				<li><a href='#' alt='Previous' class='prevPage button-blue'>Trước</a></li>
				<span class='listPages'></span>
				<li><a href='#' alt='Next' class='nextPage button-blue'>Kế tiếp</a></li>
				<span class="button-blue" style='float:right; height: 20px; padding: 0 5px 0 5px;'>Đang xem <span class='currentPage'></span> của <span class='totalPages'></span></span>
			</div>
		</section>
	</div>
	<!-- End Tables Section -->
	</section>
	<!-- Main Section End -->
</div>